<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>yadis.test.livediscover</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="yadis-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.openidenabled.com/yadis/">Python-Yadis</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="yadis-module.html">Package&nbsp;yadis</a> ::
        <a href="yadis.test-module.html">Package&nbsp;test</a> ::
        Module&nbsp;livediscover
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="yadis.test.livediscover-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="yadis.test.livediscover-module.html">Module yadis.test.livediscover</a></h1>
<pre class="py-src">
<tt class="py-lineno"> 1</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">unittest</tt> </tt>
<tt class="py-lineno"> 2</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">urllib2</tt> </tt>
<tt class="py-lineno"> 3</tt>  <tt class="py-line"> </tt>
<tt class="py-lineno"> 4</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Package yadis=yadis-module.html"><a title="yadis" class="py-name" href="#" onclick="return doclink('link-0', 'yadis', 'link-0');">yadis</a></tt></tt><tt class="py-op">.</tt><tt id="link-1" class="py-name" targets="Module yadis.discover=yadis.discover-module.html,Function yadis.discover.discover()=yadis.discover-module.html#discover"><a title="yadis.discover
yadis.discover.discover" class="py-name" href="#" onclick="return doclink('link-1', 'discover', 'link-1');">discover</a></tt></tt> <tt class="py-keyword">import</tt> <tt id="link-2" class="py-name"><a title="yadis.discover
yadis.discover.discover" class="py-name" href="#" onclick="return doclink('link-2', 'discover', 'link-1');">discover</a></tt></tt> </tt>
<tt class="py-lineno"> 5</tt>  <tt class="py-line"> </tt>
<a name="parseManifest"></a><div id="parseManifest-def"><tt class="py-lineno"> 6</tt> <a class="py-toggle" href="#" id="parseManifest-toggle" onclick="return toggle('parseManifest');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="yadis.test.livediscover-module.html#parseManifest">parseManifest</a><tt class="py-op">(</tt><tt class="py-param">lines</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="parseManifest-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="parseManifest-expanded"><tt class="py-lineno"> 7</tt>  <tt class="py-line">    <tt class="py-name">cases</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<tt class="py-lineno"> 8</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">line</tt> <tt class="py-keyword">in</tt> <tt class="py-name">lines</tt><tt class="py-op">:</tt> </tt>
<tt class="py-lineno"> 9</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">line</tt><tt class="py-op">.</tt><tt class="py-name">startswith</tt><tt class="py-op">(</tt><tt class="py-string">'#'</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-keyword">not</tt> <tt class="py-name">line</tt><tt class="py-op">.</tt><tt class="py-name">strip</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<tt class="py-lineno">10</tt>  <tt class="py-line">            <tt class="py-keyword">continue</tt> </tt>
<tt class="py-lineno">11</tt>  <tt class="py-line"> </tt>
<tt class="py-lineno">12</tt>  <tt class="py-line">        <tt class="py-comment"># remove newline</tt> </tt>
<tt class="py-lineno">13</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">assert</tt> <tt class="py-name">line</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'\n'</tt> </tt>
<tt class="py-lineno">14</tt>  <tt class="py-line">        <tt class="py-name">line</tt> <tt class="py-op">=</tt> <tt class="py-name">line</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<tt class="py-lineno">15</tt>  <tt class="py-line"> </tt>
<tt class="py-lineno">16</tt>  <tt class="py-line">        <tt class="py-comment"># split fields</tt> </tt>
<tt class="py-lineno">17</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">parts</tt> <tt class="py-op">=</tt> <tt class="py-name">line</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'\t'</tt><tt class="py-op">)</tt> </tt>
<tt class="py-lineno">18</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">parts</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">3</tt> </tt>
<tt class="py-lineno">19</tt>  <tt class="py-line"> </tt>
<tt class="py-lineno">20</tt>  <tt class="py-line">        <tt class="py-name">cases</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">tuple</tt><tt class="py-op">(</tt><tt class="py-name">parts</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<tt class="py-lineno">21</tt>  <tt class="py-line"> </tt>
<tt class="py-lineno">22</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">cases</tt> </tt>
</div><tt class="py-lineno">23</tt>  <tt class="py-line"> </tt>
<a name="DiscoverTestCase"></a><div id="DiscoverTestCase-def"><tt class="py-lineno">24</tt> <a class="py-toggle" href="#" id="DiscoverTestCase-toggle" onclick="return toggle('DiscoverTestCase');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="yadis.test.livediscover.DiscoverTestCase-class.html">DiscoverTestCase</a><tt class="py-op">(</tt><tt class="py-base-class">unittest</tt><tt class="py-op">.</tt><tt class="py-base-class">TestCase</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DiscoverTestCase-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="DiscoverTestCase-expanded"><a name="DiscoverTestCase.__init__"></a><div id="DiscoverTestCase.__init__-def"><tt class="py-lineno">25</tt> <a class="py-toggle" href="#" id="DiscoverTestCase.__init__-toggle" onclick="return toggle('DiscoverTestCase.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="yadis.test.livediscover.DiscoverTestCase-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">input_url</tt><tt class="py-op">,</tt> <tt class="py-param">normalized_url</tt><tt class="py-op">,</tt> <tt class="py-param">xrds_url</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DiscoverTestCase.__init__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="DiscoverTestCase.__init__-expanded"><tt class="py-lineno">26</tt>  <tt class="py-line">        <tt class="py-name">unittest</tt><tt class="py-op">.</tt><tt class="py-name">TestCase</tt><tt class="py-op">.</tt><tt id="link-3" class="py-name" targets="Method yadis.discover.DiscoveryFailure.__init__()=yadis.discover.DiscoveryFailure-class.html#__init__,Method yadis.discover.DiscoveryResult.__init__()=yadis.discover.DiscoveryResult-class.html#__init__,Method yadis.filters.BasicServiceEndpoint.__init__()=yadis.filters.BasicServiceEndpoint-class.html#__init__,Method yadis.filters.CompoundFilter.__init__()=yadis.filters.CompoundFilter-class.html#__init__,Method yadis.filters.TransformFilterMaker.__init__()=yadis.filters.TransformFilterMaker-class.html#__init__,Method yadis.manager.Discovery.__init__()=yadis.manager.Discovery-class.html#__init__,Method yadis.manager.YadisServiceManager.__init__()=yadis.manager.YadisServiceManager-class.html#__init__,Method yadis.parsehtml.YadisHTMLParser.__init__()=yadis.parsehtml.YadisHTMLParser-class.html#__init__,Method yadis.test.livediscover.DiscoverTestCase.__init__()=yadis.test.livediscover.DiscoverTestCase-class.html#__init__,Method yadis.test.test_accept.MatchAcceptTest.__init__()=yadis.test.test_accept.MatchAcceptTest-class.html#__init__,Method yadis.test.test_discover.TestFetcher.__init__()=yadis.test.test_discover.TestFetcher-class.html#__init__,Method yadis.test.test_discover.TestSecondGet.MockFetcher.__init__()=yadis.test.test_discover.TestSecondGet.MockFetcher-class.html#__init__,Method yadis.test.test_discover._TestCase.__init__()=yadis.test.test_discover._TestCase-class.html#__init__,Method yadis.test.test_parsehtml._TestCase.__init__()=yadis.test.test_parsehtml._TestCase-class.html#__init__,Method yadis.xrires.ProxyResolver.__init__()=yadis.xrires.ProxyResolver-class.html#__init__"><a title="yadis.discover.DiscoveryFailure.__init__
yadis.discover.DiscoveryResult.__init__
yadis.filters.BasicServiceEndpoint.__init__
yadis.filters.CompoundFilter.__init__
yadis.filters.TransformFilterMaker.__init__
yadis.manager.Discovery.__init__
yadis.manager.YadisServiceManager.__init__
yadis.parsehtml.YadisHTMLParser.__init__
yadis.test.livediscover.DiscoverTestCase.__init__
yadis.test.test_accept.MatchAcceptTest.__init__
yadis.test.test_discover.TestFetcher.__init__
yadis.test.test_discover.TestSecondGet.MockFetcher.__init__
yadis.test.test_discover._TestCase.__init__
yadis.test.test_parsehtml._TestCase.__init__
yadis.xrires.ProxyResolver.__init__" class="py-name" href="#" onclick="return doclink('link-3', '__init__', 'link-3');">__init__</a></tt></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<tt class="py-lineno">27</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">input_url</tt> <tt class="py-op">=</tt> <tt class="py-name">input_url</tt> </tt>
<tt class="py-lineno">28</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">normalized_url</tt> <tt class="py-op">=</tt> <tt class="py-name">normalized_url</tt> </tt>
<tt class="py-lineno">29</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">xrds_url</tt> <tt class="py-op">=</tt> <tt class="py-name">xrds_url</tt> </tt>
</div><tt class="py-lineno">30</tt>  <tt class="py-line"> </tt>
<a name="DiscoverTestCase.runTest"></a><div id="DiscoverTestCase.runTest-def"><tt class="py-lineno">31</tt> <a class="py-toggle" href="#" id="DiscoverTestCase.runTest-toggle" onclick="return toggle('DiscoverTestCase.runTest');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="yadis.test.livediscover.DiscoverTestCase-class.html#runTest">runTest</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DiscoverTestCase.runTest-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="DiscoverTestCase.runTest-expanded"><tt class="py-lineno">32</tt>  <tt class="py-line">        <tt class="py-name">normalized_url</tt><tt class="py-op">,</tt> <tt class="py-name">content</tt> <tt class="py-op">=</tt> <tt id="link-4" class="py-name"><a title="yadis.discover
yadis.discover.discover" class="py-name" href="#" onclick="return doclink('link-4', 'discover', 'link-1');">discover</a></tt></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">input_url</tt><tt class="py-op">)</tt> </tt>
<tt class="py-lineno">33</tt>  <tt class="py-line"> </tt>
<tt class="py-lineno">34</tt>  <tt class="py-line">        <tt class="py-name">msg</tt> <tt class="py-op">=</tt> <tt class="py-string">'Identity URL mismatch: actual = %r, expected = %r'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt> </tt>
<tt class="py-lineno">35</tt>  <tt class="py-line">            <tt class="py-name">normalized_url</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">normalized_url</tt><tt class="py-op">)</tt> </tt>
<tt class="py-lineno">36</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">failUnlessEqual</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">normalized_url</tt><tt class="py-op">,</tt> <tt class="py-name">normalized_url</tt><tt class="py-op">,</tt> <tt class="py-name">msg</tt><tt class="py-op">)</tt> </tt>
<tt class="py-lineno">37</tt>  <tt class="py-line"> </tt>
<tt class="py-lineno">38</tt>  <tt class="py-line">        <tt class="py-name">resp</tt> <tt class="py-op">=</tt> <tt class="py-name">urllib2</tt><tt class="py-op">.</tt><tt class="py-name">urlopen</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">xrds_url</tt><tt class="py-op">)</tt> </tt>
<tt class="py-lineno">39</tt>  <tt class="py-line">        <tt class="py-name">expected_content</tt> <tt class="py-op">=</tt> <tt class="py-name">resp</tt><tt class="py-op">.</tt><tt class="py-name">read</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<tt class="py-lineno">40</tt>  <tt class="py-line">        <tt class="py-name">resp</tt><tt class="py-op">.</tt><tt class="py-name">close</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<tt class="py-lineno">41</tt>  <tt class="py-line"> </tt>
<tt class="py-lineno">42</tt>  <tt class="py-line">        <tt class="py-name">msg</tt> <tt class="py-op">=</tt> <tt class="py-string">'XRDS content mismatch: actual = %r, expected = %r'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt> </tt>
<tt class="py-lineno">43</tt>  <tt class="py-line">            <tt class="py-name">content</tt><tt class="py-op">,</tt> <tt class="py-name">expected_content</tt><tt class="py-op">)</tt> </tt>
<tt class="py-lineno">44</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">failUnlessEqual</tt><tt class="py-op">(</tt><tt class="py-name">expected_content</tt><tt class="py-op">,</tt> <tt class="py-name">content</tt><tt class="py-op">,</tt> <tt class="py-name">msg</tt><tt class="py-op">)</tt> </tt>
</div><tt class="py-lineno">45</tt>  <tt class="py-line"> </tt>
<a name="DiscoverTestCase.shortDescription"></a><div id="DiscoverTestCase.shortDescription-def"><tt class="py-lineno">46</tt> <a class="py-toggle" href="#" id="DiscoverTestCase.shortDescription-toggle" onclick="return toggle('DiscoverTestCase.shortDescription');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="yadis.test.livediscover.DiscoverTestCase-class.html#shortDescription">shortDescription</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DiscoverTestCase.shortDescription-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="DiscoverTestCase.shortDescription-expanded"><tt class="py-lineno">47</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">"%s (%s)"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">input_url</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__class__</tt><tt class="py-op">.</tt><tt class="py-name">__module__</tt><tt class="py-op">)</tt> </tt>
</div></div><tt class="py-lineno">48</tt>  <tt class="py-line"> </tt>
<a name="mkSuite"></a><div id="mkSuite-def"><tt class="py-lineno">49</tt> <a class="py-toggle" href="#" id="mkSuite-toggle" onclick="return toggle('mkSuite');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="yadis.test.livediscover-module.html#mkSuite">mkSuite</a><tt class="py-op">(</tt><tt class="py-param">parsed</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="mkSuite-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="mkSuite-expanded"><tt class="py-lineno">50</tt>  <tt class="py-line">    <tt class="py-name">test_cases</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-5" class="py-name" targets="Class yadis.test.livediscover.DiscoverTestCase=yadis.test.livediscover.DiscoverTestCase-class.html"><a title="yadis.test.livediscover.DiscoverTestCase" class="py-name" href="#" onclick="return doclink('link-5', 'DiscoverTestCase', 'link-5');">DiscoverTestCase</a></tt></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">t</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">t</tt> <tt class="py-keyword">in</tt> <tt class="py-name">parsed</tt><tt class="py-op">]</tt> </tt>
<tt class="py-lineno">51</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">unittest</tt><tt class="py-op">.</tt><tt class="py-name">TestSuite</tt><tt class="py-op">(</tt><tt class="py-name">test_cases</tt><tt class="py-op">)</tt> </tt>
</div><tt class="py-lineno">52</tt>  <tt class="py-line"> </tt>
<a name="mkSuiteFromURL"></a><div id="mkSuiteFromURL-def"><tt class="py-lineno">53</tt> <a class="py-toggle" href="#" id="mkSuiteFromURL-toggle" onclick="return toggle('mkSuiteFromURL');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="yadis.test.livediscover-module.html#mkSuiteFromURL">mkSuiteFromURL</a><tt class="py-op">(</tt><tt class="py-param">manifest_url</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="mkSuiteFromURL-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="mkSuiteFromURL-expanded"><tt class="py-lineno">54</tt>  <tt class="py-line">    <tt class="py-name">req</tt> <tt class="py-op">=</tt> <tt class="py-name">urllib2</tt><tt class="py-op">.</tt><tt class="py-name">urlopen</tt><tt class="py-op">(</tt><tt class="py-name">manifest_url</tt><tt class="py-op">)</tt> </tt>
<tt class="py-lineno">55</tt>  <tt class="py-line">    <tt class="py-name">parsed</tt> <tt class="py-op">=</tt> <tt id="link-6" class="py-name" targets="Function yadis.test.livediscover.parseManifest()=yadis.test.livediscover-module.html#parseManifest"><a title="yadis.test.livediscover.parseManifest" class="py-name" href="#" onclick="return doclink('link-6', 'parseManifest', 'link-6');">parseManifest</a></tt></tt><tt class="py-op">(</tt><tt class="py-name">req</tt><tt class="py-op">)</tt> </tt>
<tt class="py-lineno">56</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-7" class="py-name" targets="Function yadis.test.livediscover.mkSuite()=yadis.test.livediscover-module.html#mkSuite"><a title="yadis.test.livediscover.mkSuite" class="py-name" href="#" onclick="return doclink('link-7', 'mkSuite', 'link-7');">mkSuite</a></tt></tt><tt class="py-op">(</tt><tt class="py-name">parsed</tt><tt class="py-op">)</tt> </tt>
</div><tt class="py-lineno">57</tt>  <tt class="py-line"> </tt>
<a name="test"></a><div id="test-def"><tt class="py-lineno">58</tt> <a class="py-toggle" href="#" id="test-toggle" onclick="return toggle('test');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="yadis.test.livediscover-module.html#test">test</a><tt class="py-op">(</tt><tt class="py-param">url</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="test-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="test-expanded"><tt class="py-lineno">59</tt>  <tt class="py-line">    <tt class="py-name">suite</tt> <tt class="py-op">=</tt> <tt id="link-8" class="py-name" targets="Function yadis.test.livediscover.mkSuiteFromURL()=yadis.test.livediscover-module.html#mkSuiteFromURL"><a title="yadis.test.livediscover.mkSuiteFromURL" class="py-name" href="#" onclick="return doclink('link-8', 'mkSuiteFromURL', 'link-8');">mkSuiteFromURL</a></tt></tt><tt class="py-op">(</tt><tt class="py-name">url</tt><tt class="py-op">)</tt> </tt>
<tt class="py-lineno">60</tt>  <tt class="py-line">    <tt id="link-9" class="py-name" targets="Variable yadis.test.test_accept.runner=yadis.test.test_accept-module.html#runner"><a title="yadis.test.test_accept.runner" class="py-name" href="#" onclick="return doclink('link-9', 'runner', 'link-9');">runner</a></tt></tt> <tt class="py-op">=</tt> <tt class="py-name">unittest</tt><tt class="py-op">.</tt><tt class="py-name">TextTestRunner</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<tt class="py-lineno">61</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-10" class="py-name"><a title="yadis.test.test_accept.runner" class="py-name" href="#" onclick="return doclink('link-10', 'runner', 'link-9');">runner</a></tt></tt><tt class="py-op">.</tt><tt class="py-name">run</tt><tt class="py-op">(</tt><tt class="py-name">suite</tt><tt class="py-op">)</tt> </tt>
</div><tt class="py-lineno">62</tt>  <tt class="py-line"> </tt>
<tt class="py-lineno">63</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-name">__name__</tt> <tt class="py-op">==</tt> <tt class="py-string">'__main__'</tt><tt class="py-op">:</tt> </tt>
<tt class="py-lineno">64</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
<tt class="py-lineno">65</tt>  <tt class="py-line">    <tt id="link-11" class="py-name" targets="Package yadis.test=yadis.test-module.html,Function yadis.test.livediscover.test()=yadis.test.livediscover-module.html#test,Function yadis.test.test_discover.test()=yadis.test.test_discover-module.html#test,Function yadis.test.test_parsehtml.test()=yadis.test.test_parsehtml-module.html#test"><a title="yadis.test
yadis.test.livediscover.test
yadis.test.test_discover.test
yadis.test.test_parsehtml.test" class="py-name" href="#" onclick="return doclink('link-11', 'test', 'link-11');">test</a></tt></tt><tt class="py-op">(</tt><tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">argv</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<tt class="py-lineno">66</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="yadis-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.openidenabled.com/yadis/">Python-Yadis</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">Generated by Epydoc
        3.0alpha3 on Fri Dec  8 13:17:19 2006</td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>
